package com.scs.application.modules.report.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.scs.application.core.entity.DataEntity;
import com.scs.application.modules.upgrade.db.annotation.EntityClassAnnotation;
import com.scs.application.modules.upgrade.db.annotation.EntityFieldAnnotation;
import com.scs.application.modules.upgrade.db.enums.EntityFieldType;
import lombok.Data;
import lombok.experimental.Accessors;
/**
 * <p>
 * 网格字段配置
 * </p>
 */
@Data
@Accessors(chain = true)
@EntityClassAnnotation(remark = "报表字段表")
@TableName("report_grid_field")
public class GridField extends DataEntity {


    // id ,在父类中处理

    @EntityFieldAnnotation(
            text = "报表ID",
            type = EntityFieldType.LONG,
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String reportId;


    @EntityFieldAnnotation(
            text = "字段名",
            length = "30",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String field;

    @EntityFieldAnnotation(
            text = "标签名",
            length = "30",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String label;

    @EntityFieldAnnotation(
            text = "对齐方式",
            length = "10",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private String align;

    @EntityFieldAnnotation(
            text = "宽度",
            length = "20",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String width;

    @EntityFieldAnnotation(
            text = "排序",
            length = "",
            not_null = true,
            default_value = "",
            comment = ""
    )
    private Integer sort;

    @EntityFieldAnnotation(
            text = "是否显示",
            length = "1",
            not_null = true,
            default_value = "0",
            comment = ""
    )
    private Boolean flagShow;


    @EntityFieldAnnotation(
            text = "合并单元格",
            length = "1",
            not_null = false,
            default_value = "0",
            comment = ""
    )
    private Boolean flagMergeCell;

    @EntityFieldAnnotation(
            text = "查询模式",
            length = "20",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String queryType;

    @EntityFieldAnnotation(
            text = "数据视图主键",
            length = "20",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String queryField;

    @EntityFieldAnnotation(
            text = "字典",
            length = "50",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String dict;


    // creator ,在父类中处理


    // gmt_create ,在父类中处理


    // modifier ,在父类中处理


    // gmt_modified ,在父类中处理

    @EntityFieldAnnotation(
            text = "备注",
            length = "200",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String remarks;


    @EntityFieldAnnotation(
            text = "视图标识",
            length = "50",
            not_null = false,
            default_value = "",
            comment = "视图标识"
    )
    private String viewKey;
    @EntityFieldAnnotation(
            text = "视图名称",
            length = "50",
            not_null = false,
            default_value = "",
            comment = "视图名称"
    )
    private String viewName;

    @EntityFieldAnnotation(
            text = "可点击",
            length = "1",
            not_null = false,
            default_value = "0",
            comment = ""
    )
    private Boolean flagClick;
    @EntityFieldAnnotation(
            text = "计算总计",
            length = "1",
            not_null = false,
            default_value = "0",
            comment = ""
    )
    private Boolean flagTotalRow;
    @EntityFieldAnnotation(
            text = "打印表头",
            length = "1",
            not_null = false,
            default_value = "0",
            comment = ""
    )
    private Boolean flagPrintHead;

    @EntityFieldAnnotation(
            text = "禁用打印",
            length = "1",
            not_null = false,
            default_value = "0",
            comment = "true：不打印该列"
    )
    private Boolean flagNorint;

    @EntityFieldAnnotation(
            text = "是动态列",
            length = "",
            not_null = false,
            default_value = "0",
            comment = ""
    )
    private Boolean flagDynamicColumn;

    @EntityFieldAnnotation(
            text = "禁止排序",
            length = "",
            not_null = false,
            default_value = "0",
            comment = ""
    )
    private Boolean flagSortDisabled;

    @EntityFieldAnnotation(
            text = "固定列",
            length = "",
            not_null = false,
            default_value = "",
            comment = "left|right"
    )
    private String fixed;

    @EntityFieldAnnotation(
            text = "点击提示",
            length = "",
            not_null = false,
            default_value = "当鼠标放上去会显示",
            comment = "left|right"
    )
    private String clickTitle;

    @EntityFieldAnnotation(
            text = "初始化日期查询限制",
            length = "",
            not_null = false,
            default_value = "0",
            comment = "默认查询当天"
    )
    private Integer initDateQuery;

    @EntityFieldAnnotation(
            text = "是否从当月第一天开始查询",
            length = "",
            not_null = false,
            default_value = "0",
            comment = "默认从当月第一天开始查询"
    )
    private Boolean flagMonthStart;
    /**
    * @Description： 是否二级表头
    */
    @TableField(exist = false)
    private Boolean flagGroup;
    @TableField(exist = false)
    private String groupField;
    @TableField(exist = false)
    private String groupValue;

    //是否是二级表头合计列
    @TableField(exist = false)
    private Boolean flagColumnSum;

    //是否底部合计
    @TableField(exist = false)
    private Boolean flagFootSum;


    @EntityFieldAnnotation(
            text = "查询必填",
            length = "",
            not_null = false,
            default_value = "0",
            comment = "true：该查询条件必须用户输入"
    )
    private Boolean flagQueryRequire;



    @EntityFieldAnnotation(
            text = "上级表头列",
            length = "30",
            not_null = false,
            default_value = "",
            comment = ""
    )
    private String parentField;
}
